package code.google.jcontainer.resolver;

/**
 * Interface for resolving Method Annotation.
 * The annotation annotated on Method will be resolved at "After Construct", "Before Method", "After Method"
 * 
 * @author <a href="mailto:jfox.young@gmail.com">Young Yang</a>
 */
public interface MethodAnnotationResolver extends AnnotationResolver{

    /**
     * Resolve Method annotation before construct the component
     * For example, want to register an annotated method to a registry
     */
    void resolveMethodAnnotationBeforeConstruct(MethodResolveContext methodResolveContext) throws ResolverException;

    /**
     * Resolve Method annotation after construct the component
     * like: @Inject on a Method
     */    
    void resolveMethodAnnotationAfterConstruct(MethodResolveContext methodResolveContext) throws ResolverException;

    /**
     * Resolve Method annotation after before invoking method
     *
     * parameters of method can be replaced by methodResolveContext.setParameters(Object[] params)
     */
    void resolveMethodAnnotationBeforeMethod(MethodResolveContext methodResolveContext) throws ResolverException;

    /**
     * Resolve Method annotation after after method invoked
     *
     * result of method can be replaced by methodResolveContext.setResult(Object result)
     */
    void resolveMethodAnnotationAfterMethod(MethodResolveContext methodResolveContext) throws ResolverException;

}